<%@ page language="java" import="java.util.*,cn.sypt.yuhao.domain.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/home/";

User ub=(User)session.getAttribute("user");


%>
<!DOCTYPE html>
<html lang="en">
<head>
   
    <meta charset="utf-8">
    <title>修改个人信息主页</title>
    <base href="<%=basePath%>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">

    <!-- The styles -->
    <link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">

    <link href="css/charisma-app.css" rel="stylesheet">
    <link href='bower_components/fullcalendar/dist/fullcalendar.css' rel='stylesheet'>
    <link href='bower_components/fullcalendar/dist/fullcalendar.print.css' rel='stylesheet' media='print'>
    <link href='bower_components/chosen/chosen.min.css' rel='stylesheet'>
    <link href='bower_components/colorbox/example3/colorbox.css' rel='stylesheet'>
    <link href='bower_components/responsive-tables/responsive-tables.css' rel='stylesheet'>
    <link href='bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css' rel='stylesheet'>
    <link href='css/jquery.noty.css' rel='stylesheet'>
    <link href='css/noty_theme_default.css' rel='stylesheet'>
    <link href='css/elfinder.min.css' rel='stylesheet'>
    <link href='css/elfinder.theme.css' rel='stylesheet'>
    <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
    <link href='css/uploadify.css' rel='stylesheet'>
    <link href='css/animate.min.css' rel='stylesheet'>

    <!-- jQuery -->
    <script src="bower_components/jquery/jquery.min.js"></script>

    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <![endif]-->

    <!-- The fav icon -->
    <link rel="shortcut icon" href="img/favicon.ico">
    <script language="javascript" src="js/trim.js"></script>
    <script language="javascript">
    
    function checkSub()
      {
      	var flag = false;
      	var cname = aform.uname.value;
      	var uemail = aform.uemail.value;
      	var uphone = aform.uphone.value;
      	var ubirth = aform.ubirth.value;
      	var zzb=/^[1|2][9|0][0-9][0-9]-[0|1][0-9]-[0-3][0-9]$/;
      	var zzp=/^1[3|4|5|8][0-9]\d{8}$/;

     
      
      	if(!zzb.test(ubirth))
      	{
      	    window.alert("格式有误请重新填写你的出生年月");
      	}
      	else if(!zzp.test(uphone))
      	{
      	    window.alert("格式有误请重新填写你的手机号码");
      	}
      
      	
        else
      	{
      		flag = true;
			
      	}
      	return flag;
      }

    
    
    </script>

</head>


<body>
    <jsp:include flush="true" page="head.jsp"></jsp:include>
<div class="ch-container">
    <div class="row">
        
        <jsp:include flush="true" page="left.jsp"></jsp:include>

       

        <div id="content" class="col-lg-10 col-sm-10">
            <!-- content starts -->
            <div>
    <ul class="breadcrumb">
        <li>
            <a href="#">个人管理中心</a>
        </li>
        <li>
            <a href="#">个人信息修改</a>
        </li>
    </ul>
</div>


<form action="<c:url value='/grglCl?flag=update'/>" name="aform" method="post">
<div class="row">
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i> 重新编辑你的个人信息</h2>

              
            </div>
            <div class="box-content">

        
                <div class="form-group has-success col-md-4">
                    <label class="control-label" for="inputSuccess1">用户名</label>
                    <input type="text" readonly class="form-control" name="uname" value="<%=ub.getUname() %>">
                    <td id="uinfo" width="400"><font color="gray" size="2px">用户名可以由小写英文字母、中文、数字组成</font></td>
                </div>
               
                <div class="form-group has-warning col-md-4">
                    <label class="control-label" for="inputWarning1">密码</label>
                    <input type="password" readonly class="form-control" name="upassword" value="<%=ub.getUpass() %>">                 
                    <td id="uinfo" width="400"><font color="gray" size="2px">修改密码请点击左边"密码重置"</font></td>
                </div>
                <div class="form-group has-error col-md-4">
                    <label class="control-label" for="inputError1">邮箱</label>
                    <input type="text" class="form-control" name="uemail" value="<%=ub.getUemail() %>">
                    <td id="einfo" width="400"><font color="gray" size="2px">符合格式的邮箱地址。</font></td>
                </div>
                  <div class="form-group has-error col-md-4">
                    <label class="control-label" for="inputError1">家庭住址或所在学校</label>
                    <input type="text" class="form-control" name="uaddress" value="<%=ub.getUaddress() %>">
                </div>
                  <div class="form-group has-error col-md-4">
                    <label class="control-label" for="inputError1">出生日期</label>
                    <input type="text" class="form-control" name="ubirth" value="<%=ub.getUbirth() %>">
                    <td id="spinfo" width="400"><font color="gray" size="2px">8位年月日的数字组合例如:1995-01-09</font></td>
                </div>
                  <div class="form-group has-error col-md-4">
                    <label class="control-label" for="inputError1">手机号码</label>
                    <input type="text" class="form-control" name="uphone" value="<%=ub.getUphone() %>">
                    <td width="400"><font color="gray" size="2px">11位的手机号码</font></td>
                </div>

                 &nbsp; &nbsp;<button type="submit" class="btn btn-default" onclick="return checkSub();">提交</button>

               
            </div>
        </div>
    </div>
    <!--/span-->

</div><!--/row-->
</form>



<!--/row-->

    <!-- content ends -->
    </div><!--/#content.col-md-0-->
</div><!--/fluid-row-->

   

    <hr>

   

     <jsp:include flush="true" page="foot.jsp"></jsp:include>

</div><!--/.fluid-container-->

<!-- external javascript -->

<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

<!-- library for cookie management -->
<script src="js/jquery.cookie.js"></script>
<!-- calender plugin -->
<script src='bower_components/moment/min/moment.min.js'></script>
<script src='bower_components/fullcalendar/dist/fullcalendar.min.js'></script>
<!-- data table plugin -->
<script src='js/jquery.dataTables.min.js'></script>

<!-- select or dropdown enhancer -->
<script src="bower_components/chosen/chosen.jquery.min.js"></script>
<!-- plugin for gallery image view -->
<script src="bower_components/colorbox/jquery.colorbox-min.js"></script>
<!-- notification plugin -->
<script src="js/jquery.noty.js"></script>
<!-- library for making tables responsive -->
<script src="bower_components/responsive-tables/responsive-tables.js"></script>
<!-- tour plugin -->
<script src="bower_components/bootstrap-tour/build/js/bootstrap-tour.min.js"></script>
<!-- star rating plugin -->
<script src="js/jquery.raty.min.js"></script>
<!-- for iOS style toggle switch -->
<script src="js/jquery.iphone.toggle.js"></script>
<!-- autogrowing textarea plugin -->
<script src="js/jquery.autogrow-textarea.js"></script>
<!-- multiple file upload plugin -->
<script src="js/jquery.uploadify-3.1.min.js"></script>
<!-- history.js for cross-browser state change on ajax -->
<script src="js/jquery.history.js"></script>
<!-- application script for Charisma demo -->
<script src="js/charisma.js"></script>


</body>

  <script>
   <% 
     String msg=(String)request.getAttribute("msg");
     if(msg!=null)
     {
   %>
     alert('<%=msg%>');
   <%     
     }
   %>
</script>
</html>

